<template>
  <div>
    <el-card shadow="never" style="width:100% ; border:none">
      <div slot="header">
        <span class="search-title">商品详情</span>
      </div>
      <div class="tinymce">
        <tinymce :width="900" :height="300" v-model="detailHtml"></tinymce>
      </div>
    </el-card>
  </div>
</template>
<script>

import Tinymce from '@/components/Tinymce'
import { mapGetters } from 'vuex';
export default {
  name: 'goodsDetail',
  porps: {
    mode: ''
  },
  computed: {
    ...mapGetters(['goodsDetailInfo'])
  },

  mounted() {
    if (this.$route.path.indexOf('updateProduct') > -1) {
      this.opmode = 1;
      // conerMarkId 为string类型，但是传过来是num类型， 坑


    } else {
      this.opmode == 0;
    }
  },
  components: { Tinymce },
  watch: {
    goodsDetailInfo: function () {
      this.detailHtml = this.goodsDetailInfo.attribute.detail
    }
  },
  data() {
    return {
      detailHtml: '',
      opmode: 0
    }
  },
  methods: {

  }
}
</script>

<style lang="scss"  scoped>
.tinymce {
  width: 900px;
}
.search-title {
  font: 18px;
  font-weight: bold;
}
</style>